package top.greatxiaozou.testAop;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class AppTest {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);

        Boy boy = context.getBean("boy", Boy.class);
        Girl girl = context.getBean("girl", Girl.class);

        String s1 = boy.buy(35);
        String s2 = girl.buy(95);

        System.out.println("男孩买到了"+s1);
        System.out.println("女孩买到了"+s2);
    }
}
